﻿using System;

namespace com.binance.client.exception
{
	public class BinanceApiException : Exception
	{

		/// 
		private const long serialVersionUID = 4360108982268949009L;
		public const string RUNTIME_ERROR = "RuntimeError";
		public const string INPUT_ERROR = "InputError";
		public const string KEY_MISSING = "KeyMissing";
		public const string SYS_ERROR = "SysError";
		public const string SUBSCRIPTION_ERROR = "SubscriptionError";
		public const string ENV_ERROR = "EnvironmentError";
		public const string EXEC_ERROR = "ExecuteError";
		private readonly string errCode;

		public BinanceApiException(string errType, string errMsg) : base(errMsg)
		{
			this.errCode = errType;
		}

		public BinanceApiException(string errType, string errMsg, Exception e) : base(errMsg, e)
		{
			this.errCode = errType;
		}

		public virtual string ErrType
		{
			get
			{
				return this.errCode;
			}
		}
	}

}